1. Field of the Invention
The present invention relates generally to an apparatus for decoding motion pictures and more particularly, to a motion picture decoding apparatus and process which are suitable for decoding signals compression coded based on the MPEG Standards for providing reconstructed pictures of lower resolutions than original pictures.
2. Prior Art
The MPEG (Moving Picture Experts Group) Standards have heretofore been known to fields, such as digital television and the like, as the system for image data compression coding.
The MPEG Standards typically include the MPEG-1 Standard and the MPEG-2 Standard. The MPEG-1 Standard handles only progressively scanned pictures (noninterlace scan) whereas the MPEG-2 Standard handles zigzag scanned pictures (interlace scan) as well as progressively scanned pictures.
The MPEG coding process includes motion compensated prediction (time based compression), DCT (space based compression) and entropy coding (variable length coding). In the MPEG coding process, predictive coding is first performed along the time axis on a macroblock basis (predictive frame coding is performed under the MPEG-1 Standard whereas the predictive frame coding or predictive field coding is performed under the MPEG-2 Standard).
The macroblock includes a 16 (number of horizontal pixels)×16 (number of vertical pixels) block of Y-signal (luminance signal), a 8(number of horizontal pixels)×8(number of vertical pixels) block of Cb-signal (color difference signal), and a 8(number of horizontal pixels)×8(number of vertical pixels) block of Cr-signal (color difference signal).
To facilitate the explanation, only the Y signal will be described. There are three picture types of “I” Picture, “P” Picture and “B” Picture depending upon the predictive coding processes. The following description will be made by way of example of the predictive frame coding.    (1) “I” Picture is coded using only information present in the frame and is not dependent upon interframe prediction. All the macroblocks of the “I” Picture depend upon the predictive intraframe coding based only on the information resident in the frame.    (2) “P” Picture is coded by prediction from the closest past “I” or “P” Picture. The macroblocks of the “P” Picture normally involve both intraframe coding using only the information present in the frame and forward predictive interframe-coding based on prediction from a past reconstructed picture.    (3) “B” Picture is coded based on bidirectional prediction and normally includes the following macroblock types.    a. a predictive intra-coded block based on only the information present in the frame;    b. a forward predictive interframe-coded block based on prediction from the closest past reconstructed picture;    c. a backward predictive interframe-coded block based on prediction from the closest future picture; and    d. an interpolative/predictive interframe-coded block based on bidirectional prediction.
It is to be noted here that the interpolative interframe prediction means to average a forward prediction and a backward prediction for two corresponding pixels.
In an MPEG decoder, image data for an original picture is divided into 16 (number of horizontal pixels)×16(number of vertical pixels) macroblocks. Except for the predictive intraframe coded macroblock, the respective macroblocks are subject to any one of the interframe prediction operations according to the macroblock type thereof for generation of prediction error data therefor.
An image data macroblock (the predictive intraframe coded macroblock) or a prediction error data macroblock (the predictive interframe coded macroblock) is divided into four 8×8 sized sub-blocks. Each image data sub-block is processed based on a two-dimensional discrete cosine transform (DCT) operation, a kind of orthogonal transformation process, using the following equation (1):
                                                                                          F                  ⁡                                      (                                          u                      ,                      v                                        )                                                  =                                ⁢                                                                            1                      4                                        ·                                          C                      ⁡                                              (                        u                        )                                                                              ⁢                                      C                    ⁡                                          (                      v                      )                                                        ⁢                                                            ∑                                              i                        =                        0                                            7                                        ⁢                                                                  ∑                                                  j                          =                          0                                                7                                            ⁢                                                                        f                          ⁡                                                      (                                                          i                              ,                              j                                                        )                                                                          ×                                                                                                                                                                                    ⁢                                  cos                  ⁢                                      {                                                                                            (                                                                                    2                              ⁢                              i                                                        +                            1                                                    )                                                ⁢                        u                        ⁢                                                                                                  ⁢                        π                                            16                                        }                                    ⁢                  cos                  ⁢                                      {                                                                                            (                                                                                    2                              ⁢                              j                                                        +                            1                                                    )                                                ⁢                        v                        ⁢                                                                                                  ⁢                        π                                            16                                        }                                                                                      ⁢                                  ⁢        wherein        ⁢                                  ⁢                  i          ,                      u            =            0                    ,          1          ,          2          ,                      …            ⁢                                                  ⁢            7                          ⁢                                  ⁢                  j          ,                      v            =            0                    ,          1          ,          2          ,                      …            ⁢                                                  ⁢            7                          ⁢                                  ⁢                              C            ⁡                          (              u              )                                ,                                    C              ⁡                              (                v                )                                      =                          {                                                                                                                  1                        /                                                  2                                                                                                                                                1                                                                      ⁢                                                                                                    (                                                  u                          =                                                                                    0                              ⁢                                                                                                                          ⁢                              or                              ⁢                                                                                                                          ⁢                              v                                                        =                            0                                                                          )                                                                                                                                                (                                                                              u                            ≠                            0                                                    ,                                                      v                            ≠                            0                                                                          )                                                                                                                                                    (        1        )            More specifically, DCT (orthogonal transform) coefficients F for a uv space (u:horizontal frequency, v:vertical frequency) are respectively determined based on the 8×8 sub-block of data pieces f (i,j), as shown in FIG. 2.
The MPEG-1 Standard supports only a DCT frame mode whereas a frame structure under the MPEG-2 Standard permits the switching between the DCT frame mode and a DCT field mode on a macroblock basis. However, a field structure under the MPEG-2 Standard supports only the DCT field mode.
In the DCT frame mode, the 16×16 macroblock is divided into four sub-blocks so that the DCT operation is performed on a 8×8 sub-block basis: an upper-left 8×8 sub-block, an upper-right 8×8 sub-block, a lower-left 8×8 sub-block and a lower-right 8×8 sub-block.
In the DCT field mode, on the other hand, the DCT operation is performed on a data group consisting of only odd-numbered lines of a left-half 8 (number of horizontal pixels)×16 (number of vertical pixels) block of the 16×16 macroblock or being worth of the 8×8 sub-block, a data group consisting of only even-numbered lines of the left-half 8×16 block of the 16×16 macroblock or being worth of the 8×8 sub-block, a data group consisting of only odd-numbered lines of a right-half 8 (number of horizontal pixels)×16 (number of vertical pixels) block of the 16×16 macroblock or being worth of the 8×8 sub-block, and a data group consisting of only even-numbered lines of the right-half 8×16 block of the 16×16 macroblock or being worth of the 8×8 sub-block.
The DCT coefficients determined in the aforementioned manner are quantized to provide quantized DCT coefficients. The quantized DCT coefficients are zigzag scanned or alternate scanned to a one dimensional sequence of coefficients so as to be encoded by a variable length encoder. An MPEG encoder outputs variable length coded transform coefficients provided by the variable length encoder as well as control information including information indicative of the macroblock type, and variable length coded motion vectors.
FIG. 1 is a block diagram showing a construction of the MPEG decoder.
A variable length coded transform coefficient is sent to a variable length decoder 101 whereas a control signal including the macroblock type is sent to a CPU 110. A variable length coded motion vector is sent to a variable length decoder 109 so as to be decoded. A motion vector provided by the variable length decoder 109 is represented in half pels rather than in full pels. The variable length decoder 109 supplies the motion vector to a first reference image memory 106 and a second reference image memory 107 as a control signal for controlling a slicing position of a reference image, while also supplying the motion vector to a first motion compensation circuit 121 and a second motion compensation circuit 122 as a motion compensation signal.
The variable length decoder 101 serves to decode the variable length coded transform coefficient. An inverse quantizer 102 serves to inversely quantize the transform coefficient (quantized DCT coefficient) supplied from the variable length decoder 101 for transformation into the DCT coefficient.
An inverse DCT circuit 103 transforms the DCT coefficient sequence, provided by the inverse quantizer 102, back to the 8×8 sub-block of DCT coefficients and performs an 8×8 sub-block based inverse DCT operation by using the following inverse transformation equation (2):
                                                                                          f                  ⁡                                      (                                          i                      ,                      j                                        )                                                  =                                ⁢                                                      1                    4                                    ·                                                            ∑                                              u                        =                        0                                            7                                        ⁢                                                                  ∑                                                  v                          =                          0                                                7                                            ⁢                                                                        C                          ⁡                                                      (                            u                            )                                                                          ⁢                                                  C                          ⁡                                                      (                            v                            )                                                                          ⁢                                                  F                          ⁡                                                      (                                                          u                              ,                              v                                                        )                                                                          ×                                                                                                                                                                                    ⁢                                  cos                  ⁢                                      {                                                                                            (                                                                                    2                              ⁢                              i                                                        +                            1                                                    )                                                ⁢                        u                        ⁢                                                                                                  ⁢                        π                                            16                                        }                                    ⁢                  cos                  ⁢                                      {                                                                                            (                                                                                    2                              ⁢                              j                                                        +                            1                                                    )                                                ⁢                        v                        ⁢                                                                                                  ⁢                        π                                            16                                        }                                                                                      ⁢                                  ⁢        wherein        ⁢                                  ⁢                  i          ,                      u            =            0                    ,          1          ,          2          ,                      …            ⁢                                                  ⁢            7                          ⁢                                  ⁢                  j          ,                      v            =            0                    ,          1          ,          2          ,                      …            ⁢                                                  ⁢            7                          ⁢                                  ⁢                              C            ⁡                          (              u              )                                ,                                    C              ⁡                              (                v                )                                      =                          {                                                                                                                  1                        /                                                  2                                                                                                                                                1                                                                      ⁢                                                                                                    (                                                  u                          =                                                                                    0                              ⁢                                                                                                                          ⁢                              or                              ⁢                                                                                                                          ⁢                              v                                                        =                            0                                                                          )                                                                                                                                                (                                                                              u                            ≠                            0                                                    ,                                                      v                            ≠                            0                                                                          )                                                                                                                                                    (        2        )            More specifically, the 8×8 sub-block of data f (i,j) is obtained from the 8×8 sub-block of DCT coefficients F(u,v) as shown in FIG. 2. Further, the reconstructed image data macroblock or prediction error data macroblock is generated by using four sub-blocks of data f (i,j).
An adder 104 processes the prediction error data macroblock provided by the inverse DCT circuit 103 by adding thereto reference image data according to the macroblock type of the prediction error data, thereby generating the reconstructed image data. The reference image data is sent to the adder 104 via a switch 112. It is noted that in a case where the inverse DCT circuit 103 outputs the reconstructed image data for predictive intraframe coding, no reference image data is added.
Where the image data macroblock provided by the inverse DCT circuit 103 or the adder 104 is reconstructed image data for “B” Picture, the reconstructed image data is sent to a switch 113.
Where the reconstructed image data macroblock provided by the inverse DCT circuit 103 or the adder 104 is reconstructed image data for “I” or “P” Picture, the reconstructed image data is committed to storage at the first reference image memory 106 or the second reference image memory 107 via a switch 111. The switch 111 is controlled by, the CPU 110.
The first and second motion compensation circuits 121, 122 each perform a half pel motion compensation operation on the reference image read from the reference image memory 106 or 107 based on a half pel motion vector supplied from the variable length decoder 109.
If a predicted pixel is located between two adjacent pixels, an average value of the two pixels is determined so that the resultant average value is used as a value of the predicted pixel. If the predicted pixel is surrounded by four pixels, an average value f the four pixels is determined so that the resultant average value is used as a value of the predicted pixel.
Respective values G1 to G5 of predicted pixels G1 to G5 are given by the following equations (3) wherein four neighboring pixels in an image read from the reference image memory 106 or 107 are represented by A, B, C and D, respectively:G1=(A+B)/2G2=(A+C)/2G3=(A+B+C+D)/4  (3)G4=(B+D)/2G5=(C+D)/2
An averaging section 108 averages the reconstructed image data provided by the first and the second motion compensation circuits 121, 122 for generating the reference image data for use in the interpolative/predictive interframe coding.
The switch 112 is controlled by the CPU 110 in the following manner. A common terminal of the switch 112 is switched to an earth terminal when the inverse DCT circuit 103 outputs reconstructed image data for predictive intraframe coding.
When an output of the inverse DCT circuit 103 is either prediction error data for forward predictive interframe coding or prediction error data for backward predictive interframe coding, the common terminal of the switch 112 is switched to select either a terminal for receiving an output from the first motion compensation circuit 121 or a terminal for receiving an output from the second motion compensation circuit 122.
When an output of the inverse DCT circuit 103 is prediction error data for interpolative/predictive interframe coding, the common terminal of the switch 112 is switched to select a terminal for receiving an output from the averaging section 108.
The switch 113 is controlled by the CPU 110 in a manner to output the reconstructed image data for “B” Picture supplied from the adder 104, the reconstructed image data for “I” or “P” Picture stored in the first reference image memory 106, and the reconstructed image data for “I” or “P” Picture stored in the second reference image memory 107 in an order corresponding to the original picture. The image data outputted from the decoder is applied to a monitor device which, in turn, displays a reconstructed image on its display screen.